<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=0,user-scalable=0">
[#include "/wap/include/static.html"]
    <style>

        body .swiper-container .swiper-slide img {
            width: 100%;
        }
    </style>
    <link rel="stylesheet" href="${path}/resources/wap/css/cite/swiper.min.css"/>
    <link rel="stylesheet" href="${path}/resources/wap/css/index/index.css"/>
</head>
<body>
<!--轮播-->
<div class="swiper-container">
    <div class="swiper-wrapper">
    [#list banners as banner]
        <div class="swiper-slide"><img src="${banner.img_src}"></div>
    [/#list]
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
    <!-- Add Navigation -->
    <!-- <div class="swiper-button-prev"></div>
     <div class="swiper-button-next"></div>-->
</div>
<!--内容选项-->
<div class="content">
    <div class="img">
        <img onclick="window.location.href='${path}/wap/bid/loanlist'" src="${path}/resources/wap/img/index/money.png">
        <img onclick="window.location.href='${path}/wap/rookie'" src="${path}/resources/wap/img/index/gift.png">
        <img onclick="window.location.href='${path}/wap/member/invite'" src="${path}/resources/wap/img/index/invite.png">
        <img onclick="window.location.href='${path}/wap/more/article/list/notice'" src="${path}/resources/wap/img/index/AboutUs.png">
    </div>
    <div class="font">
        <span onclick="window.location.href='${path}/wap/bid/loanlist'">精品理财</span>
        <span onclick="window.location.href='${path}/wap/rookie'">新手礼包</span>
        <span onclick="window.location.href='${path}/wap/member/invite'">邀请好友</span>
        <span onclick="window.location.href='${path}/wap/more/article/list/notice'">关于我们</span>
    </div>
</div>
<!--广告-->
<div class="guangGao">
    <div class="introduce">
        <img src="${path}/resources/img/index/trumpet.png" alt=""/>
    </div>
    <div class="wrap">
        <div class="roll-wrap" id="roll-wrap">
            <ul>
            [#list articles as news]
                <li><span class="headline">${news.title}</span><span class="content">${news.content}</span></li>
            [/#list]
            </ul>
        </div>
    </div>
</div>
<!--横线-->
<hr class="hr">
<!--数据的显示-->
<div class="data-show">
    <div class="data-left">
        <p>累计投资金额 (元)</p>

        <p class="number">${totalTurnover!0}</p>
    </div>
    <div class="data-right">
        <p>累计投资人数 (名)</p>

        <p class="number">${(registers)!0}</p>
    </div>
</div>
[#if rookie??]
<div class="exclusive">
    <div class="exclusiv-left">
        <img src="${path}/resources/img/index/exclusive.png" alt=""/>
    </div>
    <div class="exclusiv-center">
        <h4>${rookie.name}</h4>
        <div class="draw">
            <div class="prg-cont rad-prg" id="indicatorContainer">
                <div class="draw-content">
                    <div class="rad-con">
                        <p class="p1">年化收益</p>
                        <p class="p2">${rookie.apr}<span>%</span></p>
                    </div>
                    <div class="rad-con2">
                        <p>${rookie.min_account}元起投</p>
                        <p>限期[#if rookie.is_day==1] 天 [#else]  个月 [/#if]</p>
                    </div>
                </div>
            </div>

        </div>

        <button class="invest"><a href="${path}/wap/bid/detail/${rookie.id}">立即投资</button>
    </div>
    <div class="exclusiv-right"></div>
</div>

[/#if]

<!--横线-->
<hr class="hr">
<!--周期赢-->
<div class="period">

[#list loans as loan]
    <div class="period-content">
        <div class="content-header">
            <div class="header-left">
                <p><a href="${path}/wap/bid/detail/${loan.id}">${loan.name}</a></p>
                <span>总金额(元)${loan.account} </span><span>[#if loan.is_day==1] 天 [#else]  个月 [/#if]</span>
            </div>
            <div class="header-right">
                <p>${loan.apr}%</p>
            </div>
        </div>
        <div class="content-footer">
            <div class="progress">
                <div class="progress-content" style="width:${(loan.amount_invested/loan.account*15)}rem">${(loan.amount_invested/loan.account*100)?string("#.##")}%</div>
            </div>
        </div>
    </div>
[/#list]

</div>
<!--底部-->
[#include "/wap/include/footer.ftl"]
<script>

    $(function () {
        /*环形进度条*/
        var html = document.getElementsByTagName("html")[0];
        var rem= html.style.fontSize;
        var n=rem.indexOf("p");
        var rem1=rem.substring(0,n);
        var radius=78.5*rem1/23.4375;
        var barWidth=9*rem1/23.4375;
        //alert(radius);
        $('#indicatorContainer').radialIndicator({
            barColor: '#ff5600',
            barWidth: barWidth,
            //后台获取的值百分比
            initValue: ${rookie.amount_invested/rookie.account*100},
            roundCorner: true,
            percentage: true,
            displayNumber: false,
            /* radius: radius*/
            radius: radius
            /*77.5=175*/

        });
    });

</script>
</body>
<script src="${path}/resources/wap/js/cite/radialIndicator.js"></script>
<script src="${path}/resources/wap/js/cite/swiper.min.js"></script>
<script src="${path}/resources/wap/js/index/index.js"></script>
</html>